package main

import "fmt"

func numberSum(list []int, Tag int) []int {
	NumMap := make(map[int]int)
	for index, value := range list {
		//if _, ok := NumMap[value]; ok {
		//	continue
		//}
		flag := Tag - value
		i, ok := NumMap[flag]
		NumMap[value] = index
		if ok && i != index {
			return []int{i, index}
		}

	}
	return make([]int, 2)
}

func main() {
	//list := []int{1, 4, 2, 4, 5}
	//list := []int{3, 2, 4}
	list := []int{3, 3}
	d1 := numberSum(list, 6)
	fmt.Println(d1)
}
